#!/bin/sh

set -e

msgs=`mktemp`

# Combine all messages in a single file to build a batch transaction.
bnscli send-tokens -src 'seq:foo/src/1' -dst "seq:foo/dst/1" -amount "2 IOV" -memo "sending 2 IOV" >> $msgs
bnscli send-tokens -src 'seq:foo/src/2' -dst "seq:foo/dst/2" -amount "9 DOGE" -memo "sending 9 DOGE" >> $msgs
bnscli send-tokens -src 'seq:foo/src/3' -dst "seq:foo/dst/3" -amount "7 BTC" -memo "sending 7 BTC" >> $msgs

bnscli as-batch < $msgs | bnscli view

rm $msgs
